'use strict';

module.exports = appInfo => {
    const config = exports = {};


    // use for cookie sign key, should change to your own and keep security
    config.keys = appInfo.name + '_1525246540831_5913';


    config.sequelize = { // egg-sequelize 配置
        dialect: "mysql", // db type
        database: 'EggDemo',
        host: "123.56.15.188",
        port: "3306",
        username: "xiao",
        password: "Abc123456."
    };

    config.redis = {
        client: {
            port: 6379,          // Redis port
            host: '120.79.164.144',   // Redis host
            password: '123456',
            db: 1,
        },
    };

    config.sessionRedis = {
        key: "EGG_SESSION",
        maxAge: 24 * 3600 * 1000, // 1 天
        httpOnly: true,
        encrypt: false
    };

    // add your config here
    config.middleware = [];

    return config;
};
